﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Resources;
using System.Globalization;

namespace LPV_POS.mh_pos
{
    public partial class mh_banhang6_VAT_InOut : Form
    {
        CultureInfo culture;

        #region "Muti language"

        private void SetLanguage_banhang(string cultureName)
        {
            try
            {
                culture = CultureInfo.CreateSpecificCulture(cultureName);
                ResourceManager rm = new ResourceManager("LPV_POS.Muti_language.MyResource", typeof(mh_banhang6_VAT_InOut).Assembly);
                lblVAT_Co.Text = rm.GetString("antaiquan", culture);
                lblVAT_Khong.Text = rm.GetString("mangve", culture);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString(), "Note");
            }

        }

        #endregion
        
        public mh_banhang6_VAT_InOut()
        {
            InitializeComponent();
            culture = CultureInfo.CurrentCulture;
        }

        private void lblVAT_Co_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.OK;
            this.Close();
        }

        private void lblVAT_Khong_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Cancel;
            this.Close();
        }

        private void mh_banhang6_PhuThu_Load(object sender, EventArgs e)
        {
            cpublic ocpublic = new cpublic();
            string str_lang = ocpublic.Registry_Get("mh_main_lang");
            if (str_lang == "")
                str_lang = "vi-VN";
            SetLanguage_banhang(str_lang);
        }
    }
}
